package com.jarvis.hospital.prescription;


import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jarvis.hospital.R;
import com.jarvis.hospital.common.BaseActivity;

import butterknife.BindView;


public class CommentActivity extends BaseActivity implements View.OnClickListener{
    private CommentFragment ommentFragment;
    @BindView(R.id.rel_left)
    RelativeLayout rel_left;
    @BindView(R.id.tv_title)
    TextView tv_title;
    @Override
    public int getLayoutId() {
        return R.layout.activity_comment;
    }

    @Override
    public void initData() {;
        Bundle bundle = this.getIntent().getExtras();
        String prescriptionId = bundle.getString("prescriptionId");
        if (null == ommentFragment) {
            ommentFragment = CommentFragment.newInstance(prescriptionId);
        }
        changeFragment(R.id.main_frame, ommentFragment);
    }

    @Override
    public void initView() {
        rel_left.setOnClickListener(this);
        tv_title.setText("评论列表");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rel_left:
                finish();
                break;
        }
    }
}
